@extends('admin.base')

@section('content')
    <div class="layui-card" style="margin-top: 20px;">
        <div class="layui-card-body">

                <div class="layui-form">
                {{csrf_field()}}

                <div class="layui-form-item">
                    <label class="layui-form-label">网站位置</label>
                    <div class="layui-input-inline">
                        <select name="website_id" lay-verify="required" lay-filter="website_id">
                            @foreach($websiteData as $val)
                                 <option value="{{$val['id']}}">{{$val['names']}}</option>
                            @endforeach
                        </select>
                    </div>
                </div>

                <div class="layui-form-item">
                     <label class="layui-form-label">栏目</label>
                     <div class="layui-input-inline">
                         <select name="websites_topic_id" id="websites_topic_id" lay-verify="required">
                         </select>
                     </div>
                </div>

                <div class="layui-form-item">
                    <label class="layui-form-label">标题关键词</label>
                    <div class="layui-input-inline" style="width: 500px !important;">
                        <input type="hidden" id="category_ids" name="category_ids" value="" required>
                        <input type="text" placeholder="请输入" autocomplete="off" class="layui-input" id="demo" value="" ts-selected="">
                    </div>
                </div>
                <div class="layui-form-item">
                    <label class="layui-form-label">文章标题</label>
                    <div class="layui-input-inline" style="width: 500px !important;">
                        <input type="text" name="title" id="title" placeholder="请输入" autocomplete="off" required class="layui-input">
                    </div>
                </div>
                <div class="layui-form-item">
                    <label class="layui-form-label"></label>
                    <div class="layui-input-inline" style="width: 500px !important;">
                        <button type="button" id="create_article_title" class="layui-btn layui-btn-primary">生成文章标题</button>
                    </div>
                </div>
                <input type="hidden" value="15" id="tong">
                <div class="layui-form-item"  style="width:80%">
                    <label class="layui-form-label required" style="width: 10%">封面图</label>
                    <div class="layui-input-block">
                        <div class="layui-upload">
                            <button type="button" class="layui-btn layui-btn-sm" id="uploadPic">上传</button>
                            <div class="layui-upload-list">
                                <ul id="layui-upload-box" class="layui-clear">
                                </ul>
                                <input type="hidden" name="cover_url" id="thumb" lay-verify="required" value=""/>
                            </div>
                        </div>
                    </div>
                </div>

{{--                <div class="layui-form-item">--}}
{{--                    <label class="layui-form-label">内容关键词</label>--}}
{{--                    <div class="layui-input-inline" style="width: 500px !important;">--}}
{{--                        <input type="hidden" id="category_ids_content" name="category_ids_content" value="">--}}
{{--                        <input type="text" placeholder="请输入" autocomplete="off" class="layui-input" id="demo2" value="" ts-selected="">--}}
{{--                    </div>--}}
{{--                </div>--}}

                <div class="layui-form-item">
                    <label class="layui-form-label"></label>
                    <div class="layui-input-inline" style="width: 500px !important;">
                        <button type="button" id="create_article_content" class="layui-btn layui-btn-primary">生成文章内容</button>
                    </div>
                </div>

                <div class="layui-form-item">
                    <div class="layui-input-block">
                        <script id="editor" name="info" style="width:800px;height:700px;"></script>
                    </div>
                </div>



                <div class="layui-form-item">
                    <div class="layui-input-block">
                        <button type="submit" class="layui-btn layui-btn-sm" lay-submit="" lay-filter="formSubmit"><i class="fa fa-save"></i> 保存</button>
                        <a href="javascript:parent.layui.layer.closeAll();" class="layui-btn layui-btn-primary layui-btn-sm"><i class="fa fa-reply-all" aria-hidden="true"></i>  取消</a>
                    </div>
                </div>
                </div>
        </div>
    </div>
@endsection

@section('script')
    @include("admin.common._js_ueditor")
    @include("admin.common._js_tableSelect")
    @include('admin.common._js_upload')
    @include("admin.articles._js_create")
@endsection
